import pandas as pd

from o_930955_hongLiDiBo100 import O930955, calc

if __name__ == '__main__':
    _2025_1one = O930955()
    _2024_1one = O930955()
    _2023_1one = O930955()
    _2022_1one = O930955()

    # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    _2025_1one.three_year_ago = '20220201'
    _2024_1one.three_year_ago = '20210201'
    _2023_1one.three_year_ago = '20200201'
    _2022_1one.three_year_ago = '20190201'

    _2025_1one.one_year_ago = '20240201'
    _2024_1one.one_year_ago = '20230201'
    _2023_1one.one_year_ago = '20220201'
    _2022_1one.one_year_ago = '20210201'

    _2025_1one.zero_year_ago = '20250127'
    _2024_1one.zero_year_ago = '20240131'
    _2023_1one.zero_year_ago = '20230131'
    _2022_1one.zero_year_ago = '20220128'

    datetime_202401 = (pd.to_datetime('20240201'), pd.to_datetime('20250131'))
    datetime_202301 = (pd.to_datetime('20230201'), pd.to_datetime('20240131'))
    datetime_202201 = (pd.to_datetime('20220201'), pd.to_datetime('20230131'))
    datetime_202101 = (pd.to_datetime('20210201'), pd.to_datetime('20220131'))
    datetime_202001 = (pd.to_datetime('20200201'), pd.to_datetime('20210131'))
    datetime_201901 = (pd.to_datetime('20190201'), pd.to_datetime('20200131'))

    _2025_1one.intervals = [datetime_202401, datetime_202301, datetime_202201]
    _2024_1one.intervals = [datetime_202301, datetime_202201, datetime_202101]
    _2023_1one.intervals = [datetime_202201, datetime_202101, datetime_202001]
    _2022_1one.intervals = [datetime_202101, datetime_202001, datetime_201901]

    _2025_1one.zzqz_date = '20241231'
    _2024_1one.zzqz_date = '20231229'
    _2023_1one.zzqz_date = '20221230'
    _2022_1one.zzqz_date = '20211231'

    _2025_1one.str_930955_date = '20250331'
    _2024_1one.str_930955_date = '20240329'
    _2023_1one.str_930955_date = '20230331'
    _2022_1one.str_930955_date = '20220331'

    _2025_1one.str_filePre = 'zfile/a20250527/a1_930955_1one_2025'
    _2024_1one.str_filePre = 'zfile/a20250527/a1_930955_1one_2024'
    _2023_1one.str_filePre = 'zfile/a20250527/a1_930955_1one_2023'
    _2022_1one.str_filePre = 'zfile/a20250527/a1_930955_1one_2022'

    calc(_2024_1one)
    calc(_2025_1one)
    calc(_2023_1one)
    calc(_2022_1one)
    # calc(_2021_1one)

    pass
